<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\user\validate;

use think\Validate;

class AdminIndexValidate extends Validate
{
    protected $rule = [
        'user_nickname' => 'require',
        'user_pass'     => 'require|min:6|max:16',
        'user_repass'   => 'require|confirm:user_pass',
        'user_email'    => 'email',
    ];
    protected $message = [
        'user_nickname.require' => '昵称不能为空',
        'user_pass.require'     => '密码不能为空',
        'user_pass.min'         => '密码不能少于6个字符',
        'user_pass.max'         => '密码不能大于16个字符',
        'user_repass.require'   => '确认密码不能为空',
        'user_repass.confirm'   => '两次输入的密码不一致',
        'user_email.email'      => '邮箱格式不正确',

    ];

    protected $scene = [
        'edit'  =>  ['user_nickname','user_email'],
    ];
    

    
}